<ul class="maintabmenu multipletabmenu">
    <li><a href="<?php echo base_url(); ?>administrator/fields">Tất cả trang</a></li>
    <li class="current"><a href="">Cập nhật trang</a></li>    
</ul>
<div class="content">
    <form action="" method="post" accept-charset="utf-8" id="page-form" class="stdform">
        <div class="edit-main">
            <?php
            if ($this->session->flashdata('update_fields_success')) {
                ?>
                <div class="notification msgsuccess">
                    <a class="close"></a>
                    <p>Cập nhật thành công.</p>
                </div>
            <?php } else if ($this->session->flashdata('update_fields_error')) { ?>
                <div class="notification msgerror">
                    <a class="close"></a>
                    <p>Đã xảy ra lỗi.</p>
                </div>
            <?php } ?>
            <input type="hidden" name="id" value="<?php echo $field->id; ?>"/>
            <p><label>Tên lĩnh vực:</label></p>
            <p><span class="field"><input class="longinput" name="title" type="text" value="<?php echo $field->name; ?>"></span></p>
            <br>                            
            <p><label>Tóm tắt:</label></p>                            
            <p><span class="field"><textarea name="description"><?php echo $field->description; ?></textarea></span></p>
            <br>
            <p><label>Nội dung:</label></p>                            
            <p class="editor"><textarea name="content" id="editor_content"><?php echo $field->content; ?></textarea>
                <br>
        </div>
        <div class="edit-right">            
            <div class="widgetbox">
                <div class="title"><h2 class="general"><span>Xuất bản</span></h2></div>
                <div class="widgetcontent" style="display: block;">                                           
                    <br>
                    <p class="stdformbutton" style="margin-left: 0px;">
                        <button class="submit radius2">Cập nhật</button>
                        <input value="Hủy" class="reset radius2" type="reset">
                    </p>
                </div><!--widgetcontent-->
            </div>            
            <div class="widgetbox">
                <div class="title"><h2 class="general"><span>Ảnh đại diện</span></h2></div>
                <div class="widgetcontent" style="display: block;">
                    <input id="featured_image" name="hdffeatured_image" type="hidden">
                    <img src="<?php echo $field->image; ?>" id="featured_image_src" style="margin-bottom:10px;" height="auto" width="100%">
                    <button id="imageUpload" class="submit radius2">Chọn ảnh đại diện</button>
                </div>
            </div>
        </div>
    </form>    
</div>
<script>
    window.onload = function() {
        CKEDITOR.replace('content', {
            toolbar: 'standard',
            filebrowserBrowseUrl: '<?php echo base_url(); ?>elfinder/elfinder.html'
        });
    };
</script>

